package com.my.imq.web.root;


import com.vaadin.terminal.Sizeable;
import com.vaadin.ui.HorizontalLayout;
import com.vaadin.ui.HorizontalSplitPanel;
import com.vaadin.ui.Label;
import com.vaadin.ui.TextArea;
import com.vaadin.ui.VerticalLayout;
import com.vaadin.ui.Window;

/**
 * @author <a href="MABDELOUHAB">MABDELOUHAB</a>
 * created 21 mai 2012
 * @since 
 * @version $Id$
 */
public class RootLayout
    extends Window
{
    private final HorizontalSplitPanel mainSplit;

    private final LeftLayout leftLayout;

    private final RightLayout rightLayout;

    /**
    * 
    */
    public RootLayout()
    {

        VerticalLayout mainLayout = new VerticalLayout();
        setContent( mainLayout );
        setSizeFull();
        mainLayout.setSizeFull();
        setCaption( "ACCOR IMQ Monitoring" );

        HorizontalLayout infoBar = new HorizontalLayout();
        mainLayout.addComponent( infoBar );
        infoBar.setHeight( "50px" );
        infoBar.setWidth( "100%" );
        Label lblAppTitle = new Label( "ACCOR IMQ Monitoring" );
        lblAppTitle.setSizeFull();
        lblAppTitle.setStyleName( "v-label-app-title" );
        infoBar.addComponent( lblAppTitle );

        mainSplit = new HorizontalSplitPanel();
        mainSplit.setSizeFull();
        mainLayout.addComponent( mainSplit );
        mainLayout.setExpandRatio( mainSplit, 1 );

        leftLayout = new LeftLayout();
        leftLayout.setSpacing( true );
        
        mainSplit.setFirstComponent( leftLayout );

        rightLayout = new RightLayout();
        rightLayout.setSpacing( true );
        rightLayout.setMargin( true );
        mainSplit.setSecondComponent( rightLayout );
        mainSplit.setSplitPosition( 250, Sizeable.UNITS_PIXELS );
        
        setTheme( "chartdemo" );

    }

}